{% extends "blog.html" %}

{% block description %}
  <meta name="description" content="{% for tag in tags %}{{ tag.name }}, {% endfor %}">
{% endblock %}

{% block content %}
	
	  {% if tag %}
		<table id="forum" cellspacing="1">
		  <thead>
		    <tr>
		      <td class="forum_title" style="border-left: 1px solid white;width:70%;">{{ tag }}</td>
		      <td class="forum_title" style="width: 15%;">{{lang.author}}</td>
		      <td class="forum_title" style="width: 15%; border-right: 1px solid white;">{{lang.time}}</td>
		    </tr>
		  </thead>
		  <tbody>
			
			{% for blog in blogs %}
		  <tr>
		  <td class="forum_body">
		    <a href="{{config.url_blog}}/{{ blog.key.id }}/">{{ blog.title|escape }}</a>    
		  </td>
		  <td class="forum_body_center">{{ blog.author }}</td>
		  <td class="forum_body_center">
		    {{ blog.update.date }} {{ blog.update|time:"H:i" }}
		  </td>
		  </tr>
			{% endfor %}
		
		  </tbody>
		  
		</table>
		<br>{% include "div_pagination.html" %}
		
		{% else %}
    <table id="forum" cellspacing="1">
      <thead>
        <tr>
          <td class="forum_title" style="border-left: 1px solid white;width:70%;">{{lang.forum_board}}</td>
          <td class="forum_title" style="width: 15%;">{{lang.forum_post}}</td>
          <td class="forum_title" style="width: 15%; border-right: 1px solid white;">{{lang.forum_latest}}</td>
        </tr>
      </thead>
      <tbody>
      
      {% for tag in tags %}
      <tr>
      <td class="forum_body">
        <a href="{{config.url_blog}}/all/?tag={{ tag.name|encode|urlencode }}">{{ tag.name|escape }}</a>    
      </td>
      <td class="forum_body_center">{{ tag.number }}</td>
      <td class="forum_body_center">
        {{ tag.date.date }} {{ tag.date|time:"H:i" }}
      </td>
      </tr>
      {% endfor %}
    
      </tbody>
      
    </table>
		
		
		{% endif %}
  
{% endblock %}
